<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/rp/common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
	
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>首页</title>

    <!-- Bootstrap -->
    <link href="rp/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="rp/css/jquery-ui.css" rel="stylesheet">
    <link href="rp/scripts/awesome/css/font-awesome.min.css" rel="stylesheet">

    <!--[if lt IE 9]>
    <script src="rp/scripts/html5shiv.min.js"></script>
    <script src="rp/scripts/respond.min.js"></script>
    <![endif]-->

    <style type="text/css">
        .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1,
        .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2,
        .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3,
        .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4,
        .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5,
        .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6,
        .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7,
        .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8,
        .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9,
        .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10,
        .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11,
        .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
            padding-left: 5px;
            padding-right: 5px;
        }

        .panel {
            margin-bottom: 10px;
            border-radius: 0px;
        }
        .panel-heading {
             border-top-left-radius: 0px;
             border-top-right-radius: 0px;
         }
        .panel-body {
        	padding: 0px;
        }
        
        body {
        	padding-top: 5px;
        }
    </style>
</head>
<body>

    <div  class="container-fluid" style="">
        <div id="myGrid" class="row">
            <c:forEach items="${ panels }" var="p">
            	<div class="${ p.panelColClass }">
	                <div class="panel ${ p.panelClass }">
	                    <div class="panel-heading">
	                        <h3 class="panel-title">${ p.panelTitle }
	                        	<span class="pull-right">
	                        		<a href="javascript:;" style="color: #fff;" title="新标签页打开"
	                        			onclick="openPage(&apos;${p.panelTitle}&apos;,&apos;${p.panelSrc}&apos;)"><i class="fa fa-share-square-o fa-lg"></i></a>
	                        	</span>
	                        </h3>
	                        
	                    </div>
	                    <div class="panel-body" style="height: ${ p.panelHeight };">
	                        <div class="embed-responsive embed-responsive-16by9">
	                            <iframe class="embed-responsive-item"
	                                    src="${ p.panelSrc }"></iframe>
	                        </div>
	                    </div>
	                </div>
	            </div>
            </c:forEach>
            <!-- <div class="col-md-6">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">Panel title 2</h3>
                    </div>
                    <div class="panel-body">
                        <div class="embed-responsive embed-responsive-16by9">
                            <iframe class="embed-responsive-item"
                                    src="http://localhost:8080/RaptorPlatform/rp/system/msg/showMsgGrid?moduleAlias=nbxxmk"></iframe>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="panel panel-danger">
                    <div class="panel-heading">
                        <h3 class="panel-title">Panel title 3</h3>
                    </div>
                    <div class="panel-body">
                        <div class="embed-responsive embed-responsive-16by9">
                            <iframe class="embed-responsive-item"
                                    src="	http://localhost:8080/RaptorPlatform/rp/system/loginLogMng/loginLogGrid.jsp"></iframe>
                        </div>
                    </div>
                </div>
            </div> -->
        </div>
    </div>

    <script src="rp/scripts/jquery-1.9.1.min.js"></script>
    <script src="rp/scripts/jquery-ui-1.9.2.min.js"></script>
    <script src="rp/bootstrap/js/bootstrap.min.js"></script>

    <script type="text/javascript">
        $(function(){
            /* $("#myGrid").sortable({
                handle: ".panel-heading",
                cursor: "move",
                //revert: true,
                opacity: 0.5
            }); */
        });
        
        function openPage(_title, _url){
        	window.parent.addMainTab(_title, _url);
        }
    </script>

</body>
</html>
